home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1998 / MacHack 1998.toast / Sessions / Completions / Completions Source / Files / FileFlusher.cp < prev    next >
Encoding:
Text File  |  1998-06-15  |  517 b   |  35 lines  |  [TEXT/CWIE]

  1. // FileFlusher.cp
  2.  
  3. #ifndef FileFlusher_h
  4. #include "FileFlusher.h"
  5. #endif
  6. #ifndef FileWritingPath_h
  7. #include "FileWritingPath.h"
  8. #endif
  9.  
  10. Task *FileFlusher::operator()( const FileWritingPath& path )
  11.   {
  12.     Assert( !Running() );
  13.     Assert( path.IsOpen() );
  14.  
  15.     ioParam.ioRefNum = path.RefNum();
  16.  
  17.     return this;
  18.   }
  19.  
  20. void FileFlusher::Launch()
  21.   {
  22.     Assert( !Running() );
  23.     PBFlushFileAsync( this );
  24.   }
  25.  
  26. void FileFlusher::Kill()
  27.   {
  28.   }
  29.  
  30. OSErr FileFlusher::Result() const
  31.   {
  32.     Assert( !Running() );
  33.     return ioParam.ioResult;
  34.   }
  35.